package com.bank.backend.boot.server.controller;

import com.bank.backend.boot.base.model.dto.IdentifyDTO;
import com.bank.backend.boot.base.model.vo.IdentifyVO;
import com.bank.backend.boot.server.annotation.ResponseResult;
import com.bank.backend.boot.server.service.IdentifyService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jiaowei
 * @since 2025/4/1 11:08
 */
@Slf4j
@Tag(name = "识别欺诈")
@RestController
@RequestMapping("/identify")
public class IdentifyController {

    @Resource
    private IdentifyService identifyService;

    @Operation(summary = "识别欺诈")
    @PostMapping("/identify")
    @ResponseResult
    public IdentifyVO identify(@RequestBody IdentifyDTO identifyDTO) {
        log.warn("欺诈参数：{}", identifyDTO);
        return identifyService.identify(identifyDTO);
    }

}
